package contegor.scire.core;

import java.text.DateFormat;
import java.util.Date;

/**
 * Timestamp IdFragment.
 *
 * @version $Revision$
 * @author  Héctor Cirbián Pousa ($Author$)
 */
public class TimestampIdFragment extends LongIdFragment {
  private static final long serialVersionUID = -3145080831794312743L;

  public TimestampIdFragment(long timestamp) {
    super(timestamp);
  }

  public TimestampIdFragment(Date date) {
    super(date.getTime());
  }

  @Override
  public String toString() {
    return DateFormat.getDateTimeInstance().format(new Date(this.number));
  }
}
